<%--
 * (c)2010-2012 Andrea Caltroni (andrea.caltroni@pd.infn.it), INFN (www.infn.it)
 *
 * This file is part of the IGI Survey Portlet (from here on shortened to IGISP).
 * IGISP is free software: you can redistribute it and/or modify it 
 * under the terms of the GNU General Public License as published by the Free 
 * Software Foundation, either version 3 of the License, or (at your option) any 
 * later version.
 *
 * IGISP is distributed in the hope that it will be useful, but WITHOUT ANY 
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with IGISP. If not, see <http://www.gnu.org/licenses/>.
 *
--%>

<%@ include file="./init.jsp" %>

<h3><spring:message code="question.edit.title"/></h3>

<div class="portlet-body">

	<portlet:actionURL var="actionUrl">
		<portlet:param name="action" value="editQuestion"/>
		<portlet:param name="questionID" value="${question.id}"/>
	</portlet:actionURL>

	<form:form name="editQuestionForm" commandName="question" method="post" action="${actionUrl}">

		<div><form:errors cssClass="portlet-msg-error" /></div>

		<table class="lfr-table">
            <tr>
                <th><spring:message code="question.label.description"/>*: </th>
                <td><form:textarea path="description" rows="5" cols="40" /></td>
                <td><form:errors cssClass="portlet-msg-error" path="description" /></td>
            </tr>
            <tr>
                <th><spring:message code="question.label.position"/>*: </th>
                <td><form:select path="position" items="${questionPositions}" title="position"/></td>
                <td><form:errors cssClass="portlet-msg-error" path="position" /></td>
            </tr>
            <tr>
                <th><spring:message code="question.label.answersType"/>*: </th>
                <td><form:select path="answersType" items="${answerTypeValues}" title="answersType"/></td>
                <td><form:errors cssClass="portlet-msg-error" path="answersType" /></td>
            </tr>
			<tr>
				<th><spring:message code="question.label.survey"/>: </th>
				<td>${survey.name}</td>
				<td>&nbsp;</td>
			</tr>
		</table>

        <div class="lfr-separator">&nbsp;</div>
    
        <div class="lfr-toolbar">
            <button type="submit"><spring:message code="button.save"/></button>
        </div>

	</form:form>
</div>

<div class="lfr-separator">&nbsp;</div>

<div class="portlet-section-footer">
    <a href="<portlet:renderURL portletMode="view"/>"><img title="<spring:message code="button.home"/>" src="<html:imagesPath/>home.png" border=0 /></a>
</div>
